#!/usr/bin/python
import os,sys

matches={}
complefile=open('complement','r')
for line in complefile:
	line=line.split()
	if len(line)==2:
		matches[line[0]] = line[1]

usbkeysfile=open('usbkeys','r')
usbkeys=[] # code from 0 to 111
for line in usbkeysfile:
	usbkeys.append(line.split()[0])

vksfile=open('vks','r')
vks=[] # VK_ s
for line in vksfile:
	vks.append(line.split()[0])

for u in usbkeys:
	if u in vks:
		matches[u]=u
		continue

for u in usbkeys:
	if matches.has_key(u): dest=matches[u]
	else: dest='UNDEFINED'
	print '/* %s */ %s,'%('KEY_'+u, 'VK_'+dest)
